package com.ims.core.inconfig.service.impl;

import java.util.List;
import com.ims.common.utils.DateUtils;
import com.ims.common.utils.StringUtils;
import com.ims.common.utils.uuid.IdUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ims.core.inconfig.mapper.TInBussinessMapper;
import com.ims.core.inconfig.domain.TInBussiness;
import com.ims.core.inconfig.service.ITInBussinessService;

/**
 * 业务方管理Service业务层处理
 *
 * @author IMS
 * @date 2024-05-21
 */
@Service
public class TInBussinessServiceImpl implements ITInBussinessService
{
    @Autowired
    private TInBussinessMapper tInBussinessMapper;

    /**
     * 查询业务方管理
     *
     * @param id 业务方管理主键
     * @return 业务方管理
     */
    @Override
    public TInBussiness selectTInBussinessById(Long id)
    {
        return tInBussinessMapper.selectTInBussinessById(id);
    }

    /**
     * 查询业务方管理列表
     *
     * @param tInBussiness 业务方管理
     * @return 业务方管理
     */
    @Override
    public List<TInBussiness> selectTInBussinessList(TInBussiness tInBussiness)
    {
        return tInBussinessMapper.selectTInBussinessList(tInBussiness);
    }

    /**
     * 新增业务方管理
     *
     * @param tInBussiness 业务方管理
     * @return 结果
     */
    @Override
    public int insertTInBussiness(TInBussiness tInBussiness)
    {
        tInBussiness.setBusinessId(IdUtils.simpleUUID());
        tInBussiness.setCreateTime(DateUtils.getNowDate());
        return tInBussinessMapper.insertTInBussiness(tInBussiness);
    }

    /**
     * 修改业务方管理
     *
     * @param tInBussiness 业务方管理
     * @return 结果
     */
    @Override
    public int updateTInBussiness(TInBussiness tInBussiness)
    {
        tInBussiness.setUpdateTime(DateUtils.getNowDate());
        return tInBussinessMapper.updateTInBussiness(tInBussiness);
    }

    /**
     * 批量删除业务方管理
     *
     * @param ids 需要删除的业务方管理主键
     * @return 结果
     */
    @Override
    public int deleteTInBussinessByIds(Long[] ids)
    {
        return tInBussinessMapper.deleteTInBussinessByIds(ids);
    }

    /**
     * 删除业务方管理信息
     *
     * @param id 业务方管理主键
     * @return 结果
     */
    @Override
    public int deleteTInBussinessById(Long id)
    {
        return tInBussinessMapper.deleteTInBussinessById(id);
    }
}
